package org.lamb.framework.common.enumeration;

import lombok.Getter;
import lombok.Setter;
import org.lamb.framework.common.function.PrincipalModelFunction;
import org.lamb.framework.common.userDTO.AccountSystemUserInfoDTO;
import org.lamb.framework.common.userDTO.AppUserMainDTO;
import org.lamb.framework.common.userDTO.PeddleUserDTO;


/**
 * @description: 用户模型对应的类型
 * @author: Mr.WangGang
 * @create: 2018-12-03 上午 11:52
 **/
public enum  PrincipalModelEnum implements PrincipalModelFunction {
    //学兽用户
    APP_USER(AppUserMainDTO.class,"600000001"),
    //分销saas 店铺用户
    ACCOUNT_USER(AccountSystemUserInfoDTO.class,"600000001"),
    //用户实例对象， 用户所在系统
    PEDDLE_USER(PeddleUserDTO .class,"600000001");


    @Getter
    @Setter
    private String model;
    @Getter
    @Setter
    private Class principal;

    PrincipalModelEnum(Class<?> principalClass, String principalModel) {
        this.principal = principalClass;
        this.model = principalModel;
    }


    @Override
    public String principalModel() {
        return model;
    }

    @Override
    public Class principal() {
        return principal;
    }

}
